CVE-2021-41253
Possible heap buffer overflow when using zycore string functions in formatter hooks
Description
Zydis is an x86/x86-64 disassembler library. Users of Zydis versions v3.2.0 and older that use the string functions provided in `zycore` in order to append untrusted user data to the formatter buffer within their custom formatter hooks can run into heap buffer overflows. Older versions of Zydis failed to properly initialize the string object within the formatter buffer, forgetting to initialize a few fields, leaving their value to chance. This could then in turn cause zycore functions like `ZyanStringAppend` to make incorrect calculations for the new target size, resulting in heap memory corruption. This does not affect the regular uncustomized Zydis formatter, because Zydis internally doesn't use the string functions in zycore that act upon these fields. However, because the zycore string functions are the intended way to work with the formatter buffer for users of the library that wish to extend the formatter, we still consider this to be a vulnerability in Zydis. This bug is patched starting in version 3.2.1. As a workaround, users may refrain from using zycore string functions in their formatter hooks until updating to a patched version.
INFO
Published Date :
Nov. 8, 2021, 10:15 p.m.
Last Modified :
Nov. 21, 2024, 6:25 a.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
---|---|---|---|---|---|---|
CVSS 2.0 | MEDIUM | [email protected] | ||||
CVSS 3.1 | MEDIUM | [email protected] | ||||
CVSS 3.1 | HIGH | [email protected] |
Solution
- Update the affected packages.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2021-41253
.
URL | Resource |
---|---|
https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 | Patch Third Party Advisory |
https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g | Third Party Advisory |
https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a | Exploit Third Party Advisory |
https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 | Exploit Patch Third Party Advisory |
https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 | Patch Third Party Advisory |
https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g | Third Party Advisory |
https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a | Exploit Third Party Advisory |
https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 | Exploit Patch Third Party Advisory |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2021-41253
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2021-41253
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2021-41253
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2021-41253
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 Added Reference https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g Added Reference https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a Added Reference https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
Reanalysis by [email protected]
Oct. 24, 2022
Action Type Old Value New Value Added CWE NIST CWE-908 -
Initial Analysis by [email protected]
Nov. 15, 2021
Action Type Old Value New Value Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:P/I:P/A:P) Added CVSS V3.1 NIST AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Changed Reference Type https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 No Types Assigned https://github.com/zyantific/zydis/commit/55dd08c210722aed81b38132f5fd4a04ec1943b5 Patch, Third Party Advisory Changed Reference Type https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g No Types Assigned https://github.com/zyantific/zydis/security/advisories/GHSA-q42v-hv86-3m4g Third Party Advisory Changed Reference Type https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a No Types Assigned https://huntr.dev/bounties/96b0a482-7041-45b1-9327-c6a4a8f32d3a Exploit, Third Party Advisory Changed Reference Type https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 No Types Assigned https://huntr.dev/bounties/d2536d7d-36ce-4723-928c-98d1ee039784 Exploit, Patch, Third Party Advisory Added CPE Configuration OR *cpe:2.3:a:zyantific:zydis:*:*:*:*:*:*:*:* versions up to (including) 3.2.0
Vulnerability Scoring Details
Base CVSS Score: 8.1
Base CVSS Score: 6.8
Exploit Prediction
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.
0.55 }} 0.03%
score
0.66818
percentile